"""
继承
"""

class Phone:
    IMEI = None
    producer = "ITCAST"

    def call_by_5G(self):
        print("开启5G进行通话")

class Phone_2022(Phone):
    producer = "ITHEIMA" #复写成员变量

    def call_by_5G(self):#复写成员方法
        print("开启单核模式,确保通话时省电")
        #调用父类成员方法
        #方法1
        print(f"父类厂商是: {Phone.producer}")
        Phone.call_by_5G(self)  #需要填入一个self关键字

        #方法2
        print(f"父类厂商是: {super().producer}")
        super().call_by_5G()
        print("关闭CPU单核模式,确保性能")

phone = Phone_2022()
phone.call_by_5G()

